/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
;
layui.define(["table", "form"],
function(e) {
    var $ = layui.$,
    i = (layui.$, layui.admin),
    t = layui.view,
    l = layui.table,
    r = layui.form;
    var sale_id = 0;
    if(layui.params && layui.params.id){
        sale_id = layui.params.id;
        layui.sale_id = sale_id;
        layui.params = {};
        $('#addverifyerqrcode').data('qrcodeurl', layui.setter.baseUrl+"sale/verifyerqr?id="+sale_id)
    }
    l.render({
        elem: "#LAY-verifyer-manage",
        url: layui.setter.baseUrl+"sale/verifyer?id="+sale_id,
        cols: [[{
            field: "nickname",
            title: "用户",
            minWidth: 100,
            templet: "#verifyerMemberTpl"
        },
        {
            field: "createtime",
            title: "创建时间"
        },
        {
            title: "操作",
            align: "center",
            fixed: "right",
            style: "overflow: auto",
            toolbar: "#table-verifyer-oper"
        }]],
        page: !0,
        limit: 10,
        text: {
            none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
        }
    }),
    l.on("tool(LAY-verifyer-manage)",
    function(e) {
        var l = e.data;
        if("del" === e.event){
            layer.confirm("确定删除吗？",function(i) {
                $.post(
                    layui.setter.baseUrl+'sale/delverifyer',
                    {id: l.id},
                    function(ret){
                        var {code,msg,data} = ret;
                        layer.alert(msg);
                        if(code==0){
                            layui.table.reload('LAY-verifyer-manage');
                        }
                    }
                );
            })
        }
    }),
    e("verifyer", {})
});